<template>
	<view class="invitation">
		<view class="realques-main  item" v-for="item in items">
<!-- 			<view class="title">{{item.name}}</view>
			<view class="flex-row info">
				<view class="flex-row info-item">类别：{{item.type}}</view>
				<view class="flex-row info-item">颜色：{{item.color}}</view>
				<view class="flex-row info-item">年份：{{item.year}}</view>
				<view class="flex-row info-item">区域：{{item.area}}</view>
			</view> -->
     <view class="icon">
        <image src="@/static/common/img/people1.png">
      </view>
      <view class="cent">
        <text>{{item.studentName}}</text>
        <text>剩余{{item.balanceHour}}课时</text>
      </view>
      <view @click="classCourse(item)" class="complete" :style="{
      			backgroundColor: item.attendStatus === '1'  ? '#007aff' : '#ffffff',color:item.attendStatus  === '1'  ? '#ffffff' : '#000000'}">
        <text>到课</text>
      </view>
      <view @click="leave(item)" class="complete" :style="{
      			backgroundColor: item.attendStatus === '2'  ? '#007aff' : '#ffffff',color:item.attendStatus === '2'  ? '#ffffff' : '#000000' }">
        <text>请假</text>
      </view>
      
      
      
		</view>
	</view>
</template>

<script>
	export default {
		name:"realques-list",
		props:{
			items:{
				type:Array,
				default:[]
			}
		},
    
		data() {
			return {
				
			};
		},
    methods: {
      classCourse(item) {
        item.attendStatus = '1'
      },
      leave(item) {
        item.attendStatus = '2'
      },
    }
	}
</script>

<style lang="scss" scoped>
.realques-main{
	background-color: #fff;
	margin: 30rpx 0 30rpx;
	padding: 20rpx 48rpx;
	
	.title{
		font-size: 36rpx;
		color:#333;
		margin-bottom: 20rpx;
		font-weight: bold;
	}
	.info{
		font-size: 24rpx;
		color:#7F8BB4;
		
		.info-item{
			margin-right: 35rpx;
		}
	}
}

/** 引入真实项目时，请将以下样式拷贝到全局样式uni.scss中，不需要每个页面都定义 ----start**/
view,
image,
text {
  box-sizing: border-box;
  flex-shrink: 0;
}

#app {
  width: 100vw;
  height: 100vh;
}

.flex-row {
  display: flex;
  flex-direction: row;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.justify-start {
  display: flex;
  justify-content: flex-start;
}

.justify-center {
  display: flex;
  justify-content: center;
}

.justify-end {
  display: flex;
  justify-content: flex-end;
}

.justify-evenly {
  display: flex;
  justify-content: space-evenly;
}

.justify-around {
  display: flex;
  justify-content: space-around;
}

.justify-between {
  display: flex;
  justify-content: space-between;
}

.items-start {
  display: flex;
  align-items: flex-start;
}

.items-center {
  display: flex;
  align-items: center;
}

.items-end {
  display: flex;
  align-items: flex-end;
}





.invitation {
      .item {
        display: flex;
        align-items: center;
        margin-bottom: 25rpx;

        .icon {
          width: 84rpx;
          height: 84rpx;
          border-radius: 50%;
          display: flex;
          justify-content: center;
          align-items: center;
          margin-right: 14rpx;

          >image {
            width: 84rpx;
            height: 84rpx;
          }
        }

        .cent {
          flex: 1;
          display: flex;
          flex-direction: column;

          >text:first-child {
            font-size: 28rpx;
            color: #333333;
            line-height: 40rpx;
          }

          >text:last-child {
            font-size: 24rpx;
            color: #999999;
            line-height: 34rpx;
          }
        }

        .complete {
          width: 100rpx;
          height: 50rpx;
          border-radius: 2rpx;
          justify-content: center;
          align-items: center;
          text-align: center;
          
          border: 0.5rpx solid #e6e6e6;
          

          >text {
            font-size: 24rpx;
            font-weight: 600;
            line-height: 50rpx;
          }
        }
        }
        }
        

/** 引入真实项目时，请将以下样式拷贝到全局样式uni.scss中，不需要每个页面都定义 ----end**/
</style>